<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="pages/common/taglibs.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String tempPath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ "/";
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
   
    <title>POS收单运营管理平台</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
    <!-- 当前页面样式 -->
    <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
	<link href="<s:url value="/css/login.css"/>" type="text/css" rel="stylesheet"/>
	<script type="text/javascript" src="<s:url value="/js/jquery-1.9.1.js" />"></script>
	<script type="text/javascript" src="<s:url value="/js/jquery.slideunlock.js" />"></script> 
	<script type="text/javascript" src="<s:url value="/js/common.js" />"></script>
	<script type="text/javascript" src="<s:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
	<script type="text/javascript">
	if(window.top.location.href!=location.href)      
	{         
	    window.top.location.href=location.href;      
	} 
	var state = true;
	var ischeck= false;
	$(document).ready(function(){
		var slider = new SliderUnlock("#slider",{
            successLabelTip : "验证成功"
        },function(){
        	ischeck= true;
        });
        slider.init();
	  $("#loginBtn").click(
						function() {
						var userNameVal=$("#merchant").val();
						var passwordVal=$("#passWord").val();
					
						var flag=true;
							if(userNameVal==null||userNameVal==''){
								alert("账号不能为空");
								flag=false;
								return false;
							}
							if(passwordVal==null||passwordVal==''){
								alert("密码不能为空");
								flag=false;
								return false;
							}

							if(!ischeck){
								alert("请拖动滑块验证");
								flag=false;
								return false;
							}

							if(flag==true){
							
							 $("#loginForm").submit();
							}
							
						});
	
	});
	
					function login(){
						var userNameVal=$("#merchant").val();
						var passwordVal=$("#passWord").val();
						var flag=true;
							if(userNameVal==null||userNameVal==''){
								alert("账号不能为空");
								flag=false;
								return false;
							}
							if(passwordVal==null||passwordVal==''){
								alert("密码不能为空");
								flag=false;
								return false;
							}
							if(!ischeck){
								alert("请拖动滑块验证");
								flag=false;
								return false;
							}
							if(flag==true){
							
							 $("#loginForm").submit();
							}
					}
	
	document.onkeyup = getKey;
	function getKey(e){ 
	
				e = e || window.event; 
				var keycode = e.which ? e.which : e.keyCode; 
				
				if (keycode == 13 || keycode == 108){ //如果按下ENTER键 
					//在这里设置你想绑定的事件 
					
					if(state){
					
						login();
					}
				} 
	}
	
</script>
  </head>

<body>
	<div class="global-wrap">
		<div class="logo-title">
			<i class="icon icon-logo"></i>
			<h1>服务商平台</h1>
		</div>
		<div class="theme">
			<i class="icon icon-theme"></i>
		</div>
		  <c:if test="${not empty requestScope.info_request}">
		    	<script>alert("<c:out value="${requestScope.info_request}"/>")</script>
		  </c:if>
		<div class="login-box">
			<h2 class="login-title">登录付临门</h2>
				<s:form  id="loginForm" action="login.ct" method="post" namespace="/" theme="simple">
					<div class="login-cnt">
							<div class="line">
								<s:textfield  id="merchant"  name="merchant.accountNo"  placeholder="请输入登录帐号" />  <i class="icon icon-1"></i>
							</div>
							<div class="line">
								<s:password  id="passWord"  name="merchant.pwd" placeholder="请输入登录密码" /> <i class="icon icon-2"></i>
							</div>
							<div class="line">
				                <div id="slider">
				                    <div id="slider_bg"></div>
				                    <span id="label">&gt;&gt;</span> <span id="labelTip">拖动滑块验证</span>
				                </div>
				            </div>

							<div class="forget-paw">
								<a href="forget/forgetPwdPage.ct">忘记密码？</a>
							</div>
						</div>
					<div class="login-ft">
						<input  id="loginBtn" type="button" value="登录" />
					</div>
			   </s:form>
		</div>

	</div>

</body>

</html>
